<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>(Calculus) Centers of Gravity Using Multiple Integrals | 俊樹&#39;s Miscellaneous</title>

    
<link href="/favicon/favicon.ico" rel="shortcut icon" type="image/x-icon" />




<meta name="author" content="安田俊樹" />
<meta name="description" content="In this section we will show how double and triple integrals can be used to find the mass and center of gravity of inhomogeneous laminas and three-dimensional solids.
" />



<meta name="generator" content="Hugo 0.81.0" />

<link rel="canonical" href="https://AShao0425.github.io/posts/centers-of-gravity-using-multiple-integrals/" />


<meta property="og:title" content="(Calculus) Centers of Gravity Using Multiple Integrals" />
<meta property="og:description" content="In this section we will show how double and triple integrals can be used to find the mass and center of gravity of inhomogeneous laminas and three-dimensional solids." />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://AShao0425.github.io/posts/centers-of-gravity-using-multiple-integrals/" /><meta property="og:image" content="https://AShao0425.github.io/post1/cover2.png" /><meta property="article:section" content="posts" />
<meta property="article:published_time" content="2021-09-05T02:14:49&#43;08:00" />
<meta property="article:modified_time" content="2021-09-05T02:14:49&#43;08:00" />




<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="https://AShao0425.github.io/post1/cover2.png"/>

<meta name="twitter:title" content="(Calculus) Centers of Gravity Using Multiple Integrals"/>
<meta name="twitter:description" content="In this section we will show how double and triple integrals can be used to find the mass and center of gravity of inhomogeneous laminas and three-dimensional solids."/>


<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
<link rel="stylesheet" href="/css/icomoon.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/overlayscrollbars@1.13.1/css/OverlayScrollbars.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css@4.0.0/github-markdown.min.css">
<link rel="stylesheet" href="/css/site.css" />

<style>
  .ui.header a:not(.item, .ui.button):hover {
    text-decoration: underline;
  }

  
  a:not(.item, .ui.button) {
    color: seagreen !important;
  }
  

  
  .inverted a:not(.item, .ui.button) {
     color: darkseagreen !important;
  }
  

  
  body.default {
    
    background-color: ZgotmplZ;
    

    
    background-image: url(/background/back1.png);
    
  }
  

  
  body.dark {
    
    background-color: ZgotmplZ;
    

    
    background-image: url(/background/BackgroundBlack.jpg);
    
  }
  
</style>


<script>
  document.addEventListener('visibilitychange',function(){
      if( document.visibilityState == 'hidden' ){
      normal_title = document.title;
      document.title = 'w(ﾟДﾟ)w Ugh, site crashed！';
      }else{
      document.title = '(/▽＼) Yay, Site got fixed！';
      setTimeout(function(){
          document.title = normal_title;
      }, 1200)
      }
  });
</script>


<script src="/js/pace.min.js"></script>
<link href="/css/pace-theme-flash.css" rel="stylesheet">

    



<link rel="stylesheet" data-highlight href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release/build/styles/tomorrow.min.css" />




<script src='//unpkg.com/valine/dist/Valine.min.js'></script>




    
    <link rel="stylesheet" href="/css/custom.css" />
    
	
	
    <link rel="stylesheet" href="/live2d/css/live2d.css" />

  
    <link rel="stylesheet" href="/css/APlayer.min.css">
    <script src="/js/APlayer.min.js"></script>
  
    <script src="/js/Meting.min.js"></script>

  </head>

  <body class="default">
    
<nav class="ui secondary menu dream-menu dream-nav">

  <a class="item dream-flip-toggle" title="Flip it!">
    <i class="large link bullseye icon"></i>
  </a>
  <a class="item" href="https://AShao0425.github.io/" title="Home">
    <i class="large link home icon"></i>
  </a>
  
  <a class="item" onclick="themeSwitch(event)">
    <i class="large link icon theme-switch"></i>
  </a>
  
  
  <a class="item" title="Search" onclick="toggleSearch(event)">
    <i class="large link search icon"></i>
  </a>
  
</nav>

    <div class="flip-container">
      <div class="flipper">
        <section class="front">
          <div class="dream-max-width">
            
<div class="ui relaxed centered grid dream-grid dream-grid-single">
  
  
  
  

  
  <aside class="sixteen wide mobile sixteen wide tablet three wide computer column dream-single-aside">
    
    <div class="ui segment toc">
      <nav id="TableOfContents">
  <ul>
    <li><a href="#density-and-mass-of-an-inhomogeneous-lamina">Density and Mass of an Inhomogeneous Lamina</a>
      <ul>
        <li><a href="#example-1">Example 1</a></li>
      </ul>
    </li>
    <li><a href="#center-of-gravity-of-an-inhomogeneous-lamina">Center of Gravity of an Inhomogeneous Lamina</a>
      <ul>
        <li><a href="#example-2">Example 2</a></li>
        <li><a href="#example-3">Example 3</a></li>
      </ul>
    </li>
    <li><a href="#center-of-gravity-and-centroid-of-solid">Center of Gravity and Centroid of Solid</a>
      <ul>
        <li><a href="#example-4">Example 4</a></li>
        <li><a href="#example-5">Example 5</a></li>
      </ul>
    </li>
    <li><a href="#citation">Citation</a></li>
  </ul>
</nav>
    </div>
    

    
  </aside>
  
  <div class="sixteen wide mobile sixteen wide tablet ten wide computer column markdown-body dream-single" id="dream-save-post-as-img">
    <section class="ui top attached segment">
      <header>
        <h1 class="ui large header">(Calculus) Centers of Gravity Using Multiple Integrals<span class="sub header">
            <span class="left">
              @
              
                
                  安田俊樹
                
              

              | 
                  <span data-format="luxon">2021-09-05T02:14:49&#43;08:00</span>
                

              | 13 minutes read

              
              | Update at
                
                  <span data-format="luxon">2021-09-05T02:14:49&#43;08:00</span>
                
              
            </span>

            
            <span class="dream-share">
  <a href="#" class="save-as-image" title="Save as image" onclick="savePostAsImg()">
    <i class="save icon"></i>
  </a>
  <a href="https://twitter.com/intent/tweet?text=%28Calculus%29%20Centers%20of%20Gravity%20Using%20Multiple%20Integrals&url=https%3a%2f%2fAShao0425.github.io%2fposts%2fcenters-of-gravity-using-multiple-integrals%2f" title="Twitter">
    <i class="twitter icon"></i>
  </a>
  <a href="https://facebook.com/sharer/sharer.php?u=https%3a%2f%2fAShao0425.github.io%2fposts%2fcenters-of-gravity-using-multiple-integrals%2f" title="Facebook">
    <i class="facebook icon"></i>
  </a>
</span>

            
          </span>
        </h1>
      </header>

      <article class="main">
        
        <img class="cover" src="/post1/cover2.png" />
        

        <p><em>In this section we will show how double and triple integrals can be used to find the mass and center of gravity of inhomogeneous laminas and three-dimensional solids.</em></p>
<blockquote>
<p><strong>Always set yourself up for some musics before you work! 😊</strong></p>
</blockquote>
<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=86 src="//music.163.com/outchain/player?type=2&id=1835274556&auto=0&height=66"></iframe>
<h2 id="density-and-mass-of-an-inhomogeneous-lamina">Density and Mass of an Inhomogeneous Lamina</h2>
<p>An idealized flat object that is thin enough to be viewed as a two-dimensional plane region is called a <em><strong>lamina</strong></em> (Figure 1.1). A lamina is called <em><strong>homogeneous</strong></em> if its composition is uniform throughout and <em><strong>inhomogeneous</strong></em> otherwise. The <em><strong>density</strong></em> of a homogeneous lamina was defined to be its mass per unit area. Thus, the density $\delta$ of a homogeneous lamina of mass $M$ and area $A$ is given by $\delta=M/A$</p>
<p><img src="/post1/img1.png" alt=""></p>
<p><mark><em>Figure 1.1</em></mark></p>
<p>For an inhomogeneous lamina the composition may vary from point to point, and hence an appropriate definition of “density” must reflect this. To motivate such a definition, suppose that the lamina is placed in an $xy$-plane. The density at a point $(x,y)$ can be specified suppose that lamina is placed in an $xy$-plane. The density at a point $(x,y)$ can be specified by a function $\delta (x,y)$, called the <em><strong>density function</strong></em>, which can be interpreted as follows: Construct a small rectangle centered at $(x,y)$ and let $\Delta M$ and $\Delta A$ by the mass and area of the portion of the lamina enclosed by this rectangle (Figure 1.2). If the ratio $\Delta M / \Delta A$ approaches a limiting value as the dimensions (and hence the area) of the rectangle approach zero, then this limit is considered to be the density of the lamina at $(x,y)$. Symbolically,
$$
\delta(x, y)=\lim _{\Delta A \rightarrow 0} \frac{\Delta M}{\Delta A}
$$
From this relationship we obtain the approximation
$$
\Delta M \approx \delta(x, y) \Delta A
$$
which relates the mass and area of a small rectangular portion of the lamina centered at $(x, y)$. It is assumed that as the dimensions of the rectangle tend to zero, the error in this approximation also tends to zero.</p>
<p><img src="/post1/img2.png" alt=""></p>
<p><mark><em>Figure 1.2</em></mark></p>
<p>The following result shows how to find the mass of a lamina from its density function.</p>
<blockquote>
<p>If a lamina with a continuous density function $\delta(x, y)$ occupies a region $R$ in the $xy$-plane, then its total mass $M$ is given by
$$
M=\iint_{R} \delta(x, y) d A
$$</p>
</blockquote>
<p><img src="/post1/imga.png" alt=""></p>
<p><mark><em>Figure 1.3</em></mark></p>
<p>This formula can be motivated by a familiar limiting process that can be outlined as follows: Imagine the lamina to be subdivided into rectangular pieces using lines parallel to the coordinate axes and excluding from consideration any nonrectangular parts at the boundary (Figure 1.3). Assume that there are $n$ such rectangular pieces, and suppose that the $k$th piece has area $\Delta A_k$. If we let $\left(x_{k}^{*}, y_{k}^{*}\right)$ denote the center of the kth piece, the mass $\Delta_k$ of this piece can be approximated by
$$
\Delta M_{k} \approx \delta\left(x_{k}^{*}, y_{k}^{*}\right) \Delta A_{k}
$$
If now increase $n$ in such a way that the dimensions of the rectangles tend to zero, then it is plausible that the errors in our approximations will approach zero, so
$$
M=\lim _{n \rightarrow+\infty} \sum_{k=1}^{n} \delta\left(x_{k}^{*}, y_{k}^{*}\right) \Delta A_{k}=\iint_{R} \delta(x, y) d A
$$</p>
<h3 id="example-1">Example 1</h3>
<p><strong>A triangular lamina with vertices $(0,0)$,$(0,1)$, and $(1,0)$ has desntiy function $\delta (x,y)=xy$. Find it&rsquo;s total mass</strong></p>
<h4 id="solution">Solution</h4>
<p>Referrig to figure 1.4, the mass $M$ of the lamina is</p>
<p><img src="/post1/img3.png" alt="1.4"></p>
<p><mark><em>Figure 1.4</em></mark>
$$
M =\iint_{R} \delta(x, y) d A=\iint_{R} x y d A=\int_{0}^{1} \int_{0}^{-x+1} x y d y d x
$$
$$
=\int_{0}^{1}\left[\frac{1}{2} x y^{2}\right]_{y=0}^{-x+1} d x=\int_{0}^{1}\left[\frac{1}{2} x^{3}-x^{2}+\frac{1}{2} x\right] d x=\frac{1}{24} \text { (unit of mass) }
$$</p>
<h2 id="center-of-gravity-of-an-inhomogeneous-lamina">Center of Gravity of an Inhomogeneous Lamina</h2>
<p>Recall that the <em><strong>center of gravity</strong></em> of a lamina occupying region $R$ in the horizontal $xy$-plane is the point  $(\bar{x}, \bar{y})$ such that the effect of gravity on the lamina is “equivalent” to that of a single force acting at  $(\bar{x}, \bar{y})$. If  $(\bar{x}, \bar{y})$ is in $R$, then the lamina will balance horizontally on a point of support placed at $(\bar{x}, \bar{y})$. We now turn to this problem for an inhomogeneous lamina.</p>
<blockquote>
<p><strong>Problem</strong> Suppose that a lamina with a continuous density function $\Delta (x,y)$ occupies a region R in a horizontal $xy$-plane. Find the coordinates $(\bar{x}, \bar{y})$ of the center of gravity</p>
</blockquote>
<p><img src="/post1/imgb.png" alt=""></p>
<p><mark><em>Figure 1.5</em></mark></p>
<p>To motivate the solution of Problem 1.2, consider what happens if we try to place the lamina in Figure 1.5 on a knife-edge running along the line $y=\bar{y}$. Since the lamina behaves as if its entire mass is concentrated at $(\bar{x}, \bar{y})$, the lamina will be in perfect balance. Similarly, the lamina will be in perfect balance if the knife-edge runs along the line $x=\bar{x}$. To find these lines of balance we begin by reviewing some results from rotations.</p>
<p>Recall that if a point-mass $m$ is located at the point $(x,y)$, then the moment of $m$ about $x=a$ measures the tendency of the mass to produce a rotation about the line $x=a$, and the moment of $m$ about $y=c$ measures the tendency of the mass to produce a rotation about the line $y=c$. The moments are given by the following formulas:
$$
\left[\begin{array}{c}
\begin{array}{c}
\text { moment of } m \<br>
\text { about the } \<br>
\text { line } x=a
\end{array}
\end{array}\right]=m(x-a) \quad \text { and } \quad\left[\begin{array}{c}
\text { moment of } m \<br>
\text { about the } \<br>
\text { line } y=c
\end{array}\right]=m(y-c)
$$
<img src="/post1/img4.png" alt="">
<em>MatJax Js somehow does not support to render complex formulas with newlining in html, the correct formula is attached as an image above</em></p>
<p>If a number of point-masses are distributed throughout the $x y$-plane, the sum of their moments about $x=a$ is a measure of the tendency of the masses to produce a rotation of the plane (viewed as a weightless sheet) about the line $x=a$. If the sum of these moments is zero, the collective masses will produce no net rotational effect about the line. (Intuitively, this means that the plane would balance on a knife-edge along the line $x=a$. Similarly, if the sum of the moments of the masses about $y=c$ is zero, the plane would balance on a knife-edge along the line $y=c$.)</p>
<p>We are now ready to solve Problem 1.2. We imagine the lamina to be subdivided into rectangular pieces using lines parallel to the coordinate axes and excluding from consideration any nonrectangular pieces at the boundary (Figure 1.3). We assume that there are $n$ such rectangular pieces and that the $k$ th piece has area $\Delta A_{k}$ and mass $\Delta M_{k} .$ We will let $\left(x_{k}^{*}, y_{k}^{*}\right)$ be the center of the $k$ th piece, and we will assume that the entire mass of the $k$ th piece is concentrated at its center. The mass of the $k$ th piece can be approximated by</p>
<p>Since the lamina balances on the lines $x=\bar{x}$ and $y=\bar{y}$, the sum of the moments of the rectangular pieces about those lines should be close to zero; that is,
$$
\sum_{k=1}^{n}\left(x_{k}^{*}-\bar{x}\right) \Delta M_{k}=\sum_{k=1}^{n}\left(x_{k}^{*}-\bar{x}\right) \delta\left(x_{k}^{*}, y_{k}^{*}\right) \Delta A_{k} \approx 0 \<br>
$$
$$
\sum_{k=1}^{n}\left(y_{k}^{*}-\bar{y}\right) \Delta M_{k}=\sum_{k=1}^{n}\left(y_{k}^{*}-\bar{y}\right) \delta\left(x_{k}^{*}, y_{k}^{*}\right) \Delta A_{k} \approx 0
$$</p>
<p>If we now increase $n$ in such a way that the dimensions of the rectangles tend to zero, then it is plausible that the errors in our approximations will approach zero, so that</p>
<p><img src="/post1/for1.png" alt=""></p>
<p><img src="/post1/for2.png" alt=""></p>
<p><em>MatJax Js somehow does not support to render complex formulas, the correct formula is attached as an image above</em></p>
<p>from which we obtain
$$
\iint_{R}(x-\bar{x}) \delta(x, y) d A=\iint_{R} x \delta(x, y) d A-\bar{x} \iint_{R} \delta(x, y) d A=0 \<br>
$$
$$
\iint_{R}(y-\bar{y}) \delta(x, y) d A=\iint_{R} y \delta(x, y) d A-\bar{y} \iint_{R} \delta(x, y) d A=0
$$</p>
<p>Solving respectively for $\bar{x}$ and $\bar{y}$ gives formulas for the center of gravity of a lamina:</p>
<blockquote>
<p>$$
\text { Center of Gravity }(\bar{x}, \bar{y}) \text { of a Lamina } \<br>
$$
$$
\iint_{R} \quad \int_{R} x \delta(x, y) d A \quad \quad \bar{y}=\frac{\iint y \delta(x, y) d A}{\iint_{R} \delta(x, y) d A}
$$</p>
</blockquote>
<p>In both formulas the denominator is the mass $M$ of the lamina. The numerator in the formula for $\bar{x}$ is denoted by $M_{y}$ and is called the first moment of the lamina about the $y$-axis; the numerator of the formula for $\bar{y}$ is denoted by $M_{x}$ and is called the first moment of the lamina about the $x$-axis. Thus, Formulas can be expressed as</p>
<blockquote>
<p>$$
\text { Alternative Formulas for Center of Gravity }(\bar{x}, \bar{y}) \text { of a Lamina }
$$
$$
\bar{x}=\frac{M_{y}}{M}=\frac{1}{\text { mass of } R} \iint_{R} x \delta(x, y) d A \<br>
\bar{y}=\frac{M_{x}}{M}=\frac{1}{\text { mass of } R} \iint_{R} y \delta(x, y) d A
$$</p>
</blockquote>
<h3 id="example-2">Example 2</h3>
<p><strong>Find the center of gravity of the triangular lamina with vertices $(0,0)$, $(0,1)$, and $(1,0)$ and density function $\delta(x, y)=x y$.</strong></p>
<h4 id="solution-1">Solution</h4>
<p>In Example 1 we found the mass of the lamina to be
$$
M=\iint_{R} \delta(x, y) d A=\iint_{R} x y d A=\frac{1}{24}
$$
The moment of the lamina about the $y$-axis is
$$
M_{y} =\iint_{R} x \delta(x, y) d A=\iint_{R} x^{2} y d A=\int_{0}^{1} \int_{0}^{-x+1} x^{2} y d y d x \<br>
$$
$$
=\int_{0}^{1}\left[\frac{1}{2} x^{2} y^{2}\right]_{y=0}^{-x+1} d x=\int_{0}^{1}\left(\frac{1}{2} x^{4}-x^{3}+\frac{1}{2} x^{2}\right) d x=\frac{1}{60}
$$
and the moment about the $x$-axis is
$$
M_{x} =\iint_{R} y \delta(x, y) d A=\iint_{R} x y^{2} d A=\int_{0}^{1} \int_{0}^{-x+1} x y^{2} d y d x \<br>
$$
$$
=\int_{0}^{1}\left[\frac{1}{3} x y^{3}\right]_{y=0}^{-x+1} d x=\int_{0}^{1}\left(-\frac{1}{3} x^{4}+x^{3}-x^{2}+\frac{1}{3} x\right) d x=\frac{1}{60}
$$
From above
$$
\bar{x}=\frac{M_{y}}{M}=\frac{1 / 60}{1 / 24}=\frac{2}{5}, \quad \bar{y}=\frac{M_{x}}{M}=\frac{1 / 60}{1 / 24}=\frac{2}{5}
$$
so the center of gravity is $\left(\frac{2}{5}, \frac{2}{5}\right)$</p>
<p>Recall that the center of gravity of a homogeneous lamina is called the <em><strong>centroid of the lamina</strong></em> or sometimes the <em><strong>centroid of the region $R$</strong></em>. Because the density function $\delta$ is constant for a homogeneous lamina, the factor $\delta$ may be moved through the integral signs in $(9)$ and (10) and canceled. Thus, the centroid $(\bar{x}, \bar{y})$ is a geometric property of the region $R$ and is given by the following formulas:</p>
<blockquote>
<p>$$
\quad \text { Centroid of a Region } R \<br>
$$
$$
\bar{x}=\frac{\iint_{R} x d A}{\iint_{R} d A}=\frac{1}{\operatorname{area} \text { of } R} \iint_{R} x d A \<br>
$$
$$
\bar{y}=\frac{\iint_{R} y d A}{\iint_{R} d A}=\frac{1}{\operatorname{area} \text { of } R} \iint_{R} y d A
$$</p>
</blockquote>
<h3 id="example-3">Example 3</h3>
<p><strong>Find the centroid of the semicircular region in Figure 1.7</strong></p>
<p><img src="/post1/img1.jpg" alt=""></p>
<p><mark><em>Figure 1.7</em></mark></p>
<h4 id="solution-2">Solution</h4>
<p>By symmetry, $\bar{x}=0$ since the $y$-axis is obviously a line of balance.
$$
\bar{y} =\frac{1}{\text { area of } R} \iint_{R} y d A=\frac{1}{\frac{1}{2} \pi a^{2}} \iint_{R} y d A \<br>
$$
$$
\begin{array}{l}
\text { Evaluating in } \<br>
\text { polarcoordinates }
\end{array} \<br>
$$
$$
=\frac{1}{\frac{1}{2} \pi a^{2}} \int_{0}^{\pi} \int_{0}^{a}(r \sin \theta) r d r d \theta \quad
$$
$$
=\frac{1}{\frac{1}{2} \pi a^{2}} \int_{0}^{\pi}\left[\frac{1}{3} r^{3} \sin \theta\right]_{r=0}^{a} d \theta \<br>
$$
$$
=\frac{1}{\frac{1}{2} \pi a^{2}}\left(\frac{1}{3} a^{3}\right) \int_{0}^{\pi} \sin \theta d \theta=\frac{1}{\frac{1}{2} \pi a^{2}}\left(\frac{2}{3} a^{3}\right)=\frac{4 a}{3 \pi}
$$
so the centroid is $\left(0, \dfrac{4 a}{3 \pi}\right)$</p>
<h2 id="center-of-gravity-and-centroid-of-solid">Center of Gravity and Centroid of Solid</h2>
<p>For a three-dimensional solid $G$, the formulas for moments, center of gravity, and centroid are similar to those for laminas. If $G$ is homogeneous, then its density is defined to be its mass per unit volume. Thus, if $G$ is a homogeneous solid of mass $M$ and volume $V$, then its density $\delta$ is given by $\delta=M / V $. If $G$ is inhomogeneous and is in an $x y z$-coordinate system, then its density at a general point $(x, y, z)$ is specified by a density function $\delta(x, y, z)$ whose value at a point can be viewed as a limit:
$$
\delta(x, y, z)=\lim _{\Delta V \rightarrow 0} \frac{\Delta M}{\Delta V}
$$</p>
<p>where $\Delta M$ and $\Delta V$ represent the mass and volume of a rectangular parallelepiped, centered at $(x, y, z)$, whose dimensions tend to zero (Figure 1.8)</p>
<p><img src="/post1/img2.jpg" alt=""></p>
<p><mark><em>Figure 1.8</em></mark></p>
<p>Using the discussion of laminas as a model, you should be able to show that the mass $M$ of a solid with a continuous density function $\delta(x, y, z)$ is</p>
<blockquote>
<p>$$
M=\text { mass of } G=\iiint_{G} \delta(x, y, z) d V
$$</p>
</blockquote>
<p>The formulas for center of gravity and centroid are as follows:</p>
<blockquote>
<p>Center of Gravity $(\bar{x}, \bar{y}, \bar{z})$ of a Solid $G$
$$
\bar{x} =\frac{1}{M} \iiint_{G} x \delta(x, y, z) d V \<br>
$$
$$
\bar{y} =\frac{1}{M} \iiint_{G} y \delta(x, y, z) d V \<br>
$$
$$
\bar{z} =\frac{1}{M} \iiint_{G} z \delta(x, y, z) d V
$$</p>
</blockquote>
<blockquote>
<p>Centroid $(\bar{x}, \bar{y}, \bar{z})$ of a Solid $G$
$$
\bar{x} =\frac{1}{V} \iiint_{G} x d V \<br>
$$
$$
\bar{y} =\frac{1}{V} \iiint_{G} y d V \<br>
$$
$$
\bar{z} =\frac{1}{V} \iiint_{G} z d V
$$</p>
</blockquote>
<h3 id="example-4">Example 4</h3>
<p><strong>Find the mass and the center of gravity of a cylindrical solid of height $h$ and radius $a$ (Figure $1.9$ ), assuming that the density at each point is proportional to the distance between the point and the base of the solid.</strong></p>
<p><img src="/post1/img7.png" alt=""></p>
<p><em>(Figure 1.9)</em></p>
<h4 id="solution-3">Solution</h4>
<p>Solution. Since the density is proportional to the distance $z$ from the base, the density function has the form $\delta(x, y, z)=k z$, where $k$ is some (unknown) positive constant of proportionality. From the mass of the solid is
$$
M=\iiint_{G} \delta(x, y, z) d V =\int_{-a}^{a} \int_{-\sqrt{a^{2}-x^{2}}}^{\sqrt{a^{2}-x^{2}}} \int_{0}^{h} k z d z d y d x \<br>
$$
$$
=k \int_{-a}^{a} \int_{-\sqrt{a^{2}-x^{2}}}^{\sqrt{a^{2}-x^{2}}} \frac{1}{2} h^{2} d y d x \<br>
$$
$$
=k h^{2} \int_{-a}^{a} \sqrt{a^{2}-x^{2}} d x \<br>
$$
$$
=\frac{1}{2} k h^{2} \pi a^{2} \<br>
$$
$$
\begin{array}{l}
\text { Interpret the integral as } \<br>
\text { the area of a semicircle. }
\end{array}
$$
Without additional information, the constant $k$ cannot be determined. However, as we will now see, the value of $k$ does not affect the center of gravity.
$$
\bar{z} =\frac{1}{M} \iiint_{G} z \delta(x, y, z) d V=\frac{1}{\frac{1}{2} k h^{2} \pi a^{2}} \iiint_{G} z \delta(x, y, z) d V \<br>
$$
$$
=\frac{1}{\frac{1}{2} k h^{2} \pi a^{2}} \int_{-a}^{a} \int_{-\sqrt{a^{2}-x^{2}}}^{\sqrt{a^{2}-x^{2}}} \int_{0}^{h} z(k z) d z d y d x \<br>
$$
$$
=\frac{k}{\frac{1}{2} k h^{2} \pi a^{2}} \int_{-a}^{a} \int_{-\sqrt{a^{2}-x^{2}}}^{\sqrt{a^{2}-x^{2}}} \frac{1}{3} h^{3} d y d x \<br>
$$
$$
=\frac{\frac{1}{3} k h^{3}}{\frac{1}{2} k h^{2} \pi a^{2}} \int_{-a}^{a} 2 \sqrt{a^{2}-x^{2}} d x \<br>
$$
$$
=\frac{\frac{1}{3} k h^{3} \pi a^{2}}{\frac{1}{2} k h^{2} \pi a^{2}}=\frac{2}{3} h
$$
Similar calculations using (16) will yield $\bar{x}=\bar{y}=0$. However, this is evident by inspection, since it follows from the symmetry of the solid and the form of its density function that the center of gravity is on the $z$-axis. Thus, the center of gravity is $\left(0,0, \frac{2}{3} h\right)$</p>
<h3 id="example-5">Example 5</h3>
<p>Find the centroid of the solid $G$ bounded below by the cone $z=\sqrt{x^{2}+y^{2}}$ and above by the snhere $x^{2}+y^{2}+z^{2}=16$ and above by the sphere $x^{2}+y^{2}+z^{2}=16$.</p>
<h4 id="solution-4">Solution</h4>
<p><img src="/post1/img8.png" alt=""></p>
<p><mark><em>(Figure 2.0)</em></mark></p>
<p>The solid $G$ is sketched in Figure 2.0. In Example 3, spherical coordinates were used to find that the volume of $G$ is
$$
V=\frac{64 \pi}{3}(2-\sqrt{2})
$$</p>
<p>By symmetry, the centroid $(\bar{x}, \bar{y}, \bar{z})$ is on the $z$-axis, so $\bar{x}=\bar{y}=0$. In spherical coordinates, the equation of the sphere $x^{2}+y^{2}+z^{2}=16$ is $\rho=4$ and the equation of the cone, $z=\sqrt{x^{2}+y^{2}}$ is $\phi=\pi / 4$, so we have
$$
\bar{z} =\frac{1}{V} \iiint_{G} z d V=\frac{1}{V} \int_{0}^{2 \pi} \int_{0}^{\pi / 4} \int_{0}^{4}(\rho \cos \phi) \rho^{2} \sin \phi d \rho d \phi d \theta \<br>
$$
$$
=\frac{1}{V} \int_{0}^{2 \pi} \int_{0}^{\pi / 4}\left[\frac{\rho^{4}}{4} \cos \phi \sin \phi\right]_{\rho=0}^{4} d \phi d \theta \<br>
$$
$$
=\frac{64}{V} \int_{0}^{2 \pi} \int_{0}^{\pi / 4} \sin \phi \cos \phi d \phi d \theta=\frac{64}{V} \int_{0}^{2 \pi}\left[\frac{1}{2} \sin ^{2} \phi\right]_{\phi=0}^{\pi / 4} d \theta \<br>
$$
$$
=\frac{16}{V} \int_{0}^{2 \pi} d \theta=\frac{32 \pi}{V}=\frac{3}{2(2-\sqrt{2})}
$$
The centroid of $G$ is
$$
(\bar{x}, \bar{y}, \bar{z})=\left(0,0, \frac{3}{2(2-\sqrt{2})}\right) \approx(0,0,2.561)
$$</p>
<h2 id="citation">Citation</h2>
<ul>
<li>Calculus Early: TRANSCENDENTALS, by Anton Bivon Davis, 10th ed., Addison-Wesley, 2000, pp. 1071–1077.</li>
<li>All the images appeared in the article are from the internet</li>
</ul>
<p><strong>All finished! You achieved it! Wish you have a good one.😊</strong></p>
      </article>
    </section>

    

    

    
    <article class="ui segment" data-html2canvas-ignore>
      <div id="vcomments"></div>
    </article>

    <script>
      new Valine({
        el: '#vcomments',
        appId: "mmsIvsDj8zvjpXmWqjS1DE0a-MdYXbMMI",
        appKey: "SM2s2HytuJJzA4lKWcAVKGMG",
        lang:  null 
      })
    </script>
    
  </div>
</div>

            <footer class="ui basic center aligned segment" style="background-color: transparent;">
              
              <p>© 2020 - 2021 俊樹&#39;s Miscellaneous</p>
              
            
            
            <script type="text/javascript"> 
              if(window.console) {
	              var cons = console; 
	              if(cons) { 
		              cons.group("Hey hey hey👀！");
		              cons.info("👋🏻Hi there, YES IT'S YOU, watching my source code yea?！I'm watching you🖕🏻 https://ashao0425.github.io/"); 
		              cons.log("%c俊樹's Miscellaneous", "background-image: linear-gradient(#063053, #395873, #5c7c99);font-size: 2rem;");
		              cons.info("==============================Splitting Line==============================");
		              cons.log("  █████▒█    ██  ▄████▄   ██ ▄█▀       ██████╗ ██╗   ██╗ ██████╗\n▓██   ▒ ██  ▓██▒▒██▀ ▀█   ██▄█▒        ██╔══██╗██║   ██║██╔════╝\n▒████ ░▓██  ▒██░▒▓█    ▄ ▓███▄░        ██████╔╝██║   ██║██║  ███╗\n░▓█▒  ░▓▓█  ░██░▒▓▓▄ ▄██▒▓██ █▄        ██╔══██╗██║   ██║██║   ██║\n░▒█░   ▒▒█████▓ ▒ ▓███▀ ░▒██▒ █▄       ██████╔╝╚██████╔╝╚██████╔╝\n ▒ ░   ░▒▓▒ ▒ ▒ ░ ░▒ ▒  ░▒ ▒▒ ▓▒       ╚═════╝  ╚═════╝  ╚═════╝\n ░     ░░▒░ ░ ░   ░  ▒   ░ ░▒ ▒░\n ░ ░    ░░░ ░ ░ ░        ░ ░░ ░\n          ░     ░ ░      ░  ░\n")
		              cons.groupEnd();
	              } 
              }
              </script>
              
			        
              <center>
                <script async src="/js/busuanzi.pure.mini.js"></script>
				        👀Site views: <span style="color:seagreen"><span id="busuanzi_value_site_pv"></span></span> times
              </center>
              
			        
              <center>
                👶Site age: <SPAN id=span_dt_dt style="color: #2E8B57;"></SPAN>
                <SCRIPT language=javascript>
                function show_date_time(){
                window.setTimeout("show_date_time()", 1000);
                BirthDay=new Date("9/5/2021 02:14:49");
                today=new Date();
                timeold=(today.getTime()-BirthDay.getTime());
                sectimeold=timeold/1000
                secondsold=Math.floor(sectimeold);
                msPerDay=24*60*60*1000
                e_daysold=timeold/msPerDay
                daysold=Math.floor(e_daysold);
                e_hrsold=(e_daysold-daysold)*24;
                hrsold=Math.floor(e_hrsold);
                e_minsold=(e_hrsold-hrsold)*60;
                minsold=Math.floor((e_hrsold-hrsold)*60);
                seconds=Math.floor((e_minsold-minsold)*60);
                span_dt_dt.innerHTML=""+daysold+" "+"days"+" "+hrsold+" "+"hours"+" "+minsold+" "+"minutes"+" "+seconds+" "+"seconds";
                }
                show_date_time();
                </SCRIPT>
              </center>
              
              
              
              
            </footer>
          </div>
        </section>
        <section class="back">
          <div class="dream-max-width">
            <header class="ui basic very padded segment dream-header">
  
  <div class="ui small circular image">
    <img src="/avatar/Avatar3.jpg" alt="avatar" />
  </div>
  

  
    <script>
  MathJax = {
    tex: {
      inlineMath: [['$', '$'], ['\\(', '\\)']],
      displayMath: [['$$','$$'], ['\\[', '\\]']],
      processEscapes: true,
      processEnvironments: true
    },
    options: {
      skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre']
    }
  };
  
  window.addEventListener('load', (event) => {
      document.querySelectorAll("mjx-container").forEach(function(x){
        x.parentElement.classList += 'has-jax'})
    });
  
  </script>
  <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
  <script type="text/javascript" id="MathJax-script" async
    src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
  

  <div class="content">
    <h1 class="ui medium header">俊樹&#39;s Miscellaneous<span class="sub header"><div id="binft"></div><script>var binft=function(t){function r(){return f[Math.floor(Math.random()*f.length)]}function e(){return String.fromCharCode(94*Math.random()+33)}function n(t){for(var n=document.createDocumentFragment(),i=0;t>i;i++){var l=document.createElement("span");l.textContent=e(),l.style.color=r(),n.appendChild(l)}return n}function i(){var r=a[c.skillI];c.step?c.step--:(c.step=o,c.prefixP<l.length?(c.prefixP>=0&&(c.text+=l[c.prefixP]),c.prefixP++):"forward"===c.direction?c.skillP<r.length?(c.text+=r[c.skillP],c.skillP++):c.delay?c.delay--:(c.direction="backward",c.delay=g):c.skillP>0?(c.text=c.text.slice(0,-1),c.skillP--):(c.skillI=(c.skillI+1)%a.length,c.direction="forward")),t.textContent=c.text,t.appendChild(n(c.prefixP<l.length?Math.min(b,b+c.prefixP):Math.min(b,r.length-c.skillP))),setTimeout(i,d)}var l="",a=["Lover of Mathematics and Science."].map(function(t){return t+""}),g=2,o=1,b=5,d=75,f=["rgb(110,64,170)","rgb(150,61,179)","rgb(191,60,175)","rgb(228,65,157)","rgb(254,75,131)","rgb(255,94,99)","rgb(255,120,71)","rgb(251,150,51)","rgb(226,183,47)","rgb(198,214,60)","rgb(175,240,91)","rgb(127,246,88)","rgb(82,246,103)","rgb(48,239,130)","rgb(29,223,163)","rgb(26,199,194)","rgb(35,171,216)","rgb(54,140,225)","rgb(76,110,219)","rgb(96,84,200)"],c={text:"",prefixP:-b,skillI:0,skillP:0,direction:"forward",delay:g,step:o};i()};binft(document.getElementById("binft"));</script></span>
    </h1>

    <article class="ui horizontal list">
      
      <a class="item" href="/posts">
        <i class="archive icon" title="Archives"></i>
      </a>
      
      <a class="item" href="/categories">
        <i class="th list icon" title="All Categories"></i>
      </a>
      <a class="item" href="/tags">
        <i class="tags icon" title="All Tags"></i>
      </a>
    </article>

    
    
    
    
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
    

    

    
    
    
          <div class="dream-tags">
          
          
          
            <a class="ui label" href="/tags/bash/" title="Bash">
              Bash
            </a>
          
          
          
            <a class="ui label" href="/tags/browsers/" title="Browsers">
              Browsers
            </a>
          
          
          
            <a class="ui label" href="/tags/c/" title="C">
              C
            </a>
          
          
          
            <a class="ui label" href="/tags/chrome/" title="Chrome">
              Chrome
            </a>
          
          
          
            <a class="ui label" href="/tags/code/" title="Code">
              Code
            </a>
          
          
          
            <a class="ui label" href="/tags/css/" title="Css">
              Css
            </a>
          
          
          
            <a class="ui label" href="/tags/design/" title="Design">
              Design
            </a>
          
          
          
            <a class="ui label" href="/tags/download/" title="Download">
              Download
            </a>
          
          
          
            <a class="ui label" href="/tags/extension/" title="Extension">
              Extension
            </a>
          
          
          
            <a class="ui label" href="/tags/game/" title="Game">
              Game
            </a>
          
          
          
            <a class="ui label" href="/tags/git/" title="Git">
              Git
            </a>
          
          
          
            <a class="ui label" href="/tags/github/" title="Github">
              Github
            </a>
          
          
          
            <a class="ui label" href="/tags/gravity/" title="Gravity">
              Gravity
            </a>
          
          
          
            <a class="ui label" href="/tags/html/" title="Html">
              Html
            </a>
          
          
          
            <a class="ui label" href="/tags/hugo/" title="Hugo">
              Hugo
            </a>
          
          
          
            <a class="ui label" href="/tags/js/" title="Js">
              Js
            </a>
          
          
          
            <a class="ui label" href="/tags/latex/" title="LaTeX">
              LaTeX
            </a>
          
          
          
            <a class="ui label" href="/tags/mathematics/" title="Mathematics">
              Mathematics
            </a>
          
          
          
            <a class="ui label" href="/tags/mathjax/" title="MathJax">
              MathJax
            </a>
          
          
          
            <a class="ui label" href="/tags/pornhub/" title="Pornhub">
              Pornhub
            </a>
          
          
          
            <a class="ui label" href="/tags/ssh-key/" title="SSH Key">
              SSH Key
            </a>
          
          
          
            <a class="ui label" href="/tags/tutorial/" title="Tutorial">
              Tutorial
            </a>
          
          
          
            <a class="ui label" href="/tags/violentmonkey/" title="Violentmonkey">
              Violentmonkey
            </a>
          
          
          
            <a class="ui label" href="/tags/website/" title="Website">
              Website
            </a>
          
          </div>
    

    
  </div>

  
  <script src="/js/sweetalert.min.js"></script> 
  <link rel="stylesheet" href="/css/sweetalert.css" type='text/css' media='all' />
</header>

<script>document.body.oncopy = function() {swal("Copied successfully！", "If you would you like to use this site, please attribute or indicate the source if authorized！","success");};</script>

<div class="ui relaxed grid dream-grid dream-back">
  
  
  
  <div class="sixteen wide mobile eight wide tablet four wide computer column dream-column">
    <article class="ui segment markdown-body">
      <div class="ui medium header">Bio 👋</div>
      <ul>
<li><strong>👨Names</strong>:
<ul>
<li>English: Alex Shao</li>
<li>中文: 邵宪辉</li>
<li>日本語：安田俊樹</li>
</ul>
</li>
<li><strong>👀Age</strong>: 16, 2005/4/25</li>
<li><strong>🏫School</strong>: SLAS (shittiest school ever)</li>
<li><strong>❤️Interests</strong>: Python, Html, Java, Js, Anime(especially &ldquo;ダンジョンに出会いを求めるのは間違っているだろうか&rdquo;), Math, Science, Sleep, Diarreah &amp; Constipation (Well, I had stomache issue since I was born, innate), bikes</li>
<li><strong>🚩Nationality</strong>: Chinese &amp; Japanese (Microsoft somehow does not support country flag emojis&hellip;)</li>
<li><strong>💼Occupation</strong>: Student</li>
<li><strong>📺Movies</strong>: No movies, animes only, &ldquo;ダンジョンに出会いを求めるのは間違っているだろうか&rdquo;</li>
<li><strong>📫Email</strong>: <a href="mailto:alex2005@gmail.com">alex2005@gmail.com</a></li>
<li><strong>👨‍🏫Values</strong>: Constrain impetuosity</li>
<li><strong>🐧QQ</strong>: 1959796501 (Also contact my QQ besides mail)</li>
<li><strong>💻Device</strong>: Huawei Matebook 14, 2019</li>
<li><strong>🖱️IDE</strong>: VsCode</li>
</ul>

    </article>
  </div>
  
  <div class="sixteen wide mobile eight wide tablet four wide computer column dream-column">
    <article class="ui segment markdown-body">
      <div class="ui medium header">Acknowledgments</div>
      <ul>
<li><strong>Vansh Kamleshbhai Padaliya</strong>: Always helping and assisting with no doubts and hesitations, good buddy, known for 3 years.</li>
<li><strong>吴思萌 Mónica</strong>: An elder sister, always accompanying and encouraging, deskmate in previous school, known for 5 years.</li>
<li><strong>姚轶膑</strong>: Great buddy as well, spent time screwing out often, always encouraging, known for 5 years.</li>
<li><strong>Koki Kin</strong>: Typical Japanese Otaku, still a great buddy, known for 1.5 years, giving help when I need.</li>
<li><strong>Semih Deli</strong>: Known since 2, developed this site together.</li>
<li>All the others people who answered my requests I pulled on Github when I met problems.</li>
</ul>

    </article>
  </div>
  

  <div class="sixteen wide mobile eight wide tablet four wide computer column dream-column">
    <article class="ui segment">
      <div class="ui medium header">Social Links</div>
      <nav class="ui secondary menu dream-menu dream-socials">
  
  <a class="item" href="/index.xml">
    <i class="large rss square icon" title="RSS"></i>
  </a>
  

  
  <a class="item" href="mailto:AlexShao20050425@163.com">
    <i class="large mail icon" title="Email"></i>
  </a>
  

  

  

  

  

  

  

  

  

  
  
  
    <a class="item" href="https://github.com/ashao0425" target="_blank">
      <i class="large github icon" title="GitHub"></i>
    </a>
  
  
</nav>

    </article>
  </div>

  <div class="sixteen wide mobile eight wide tablet four wide computer column dream-column">
    
    <article class="ui segment">
      <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.
    </article>
    
  </div>

  
</div>

          </div>
        </section>
      </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0"></script>
    <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>

    
    <div class="ui segment" id="dream-search">
  <div class="ui search">
    <div class="ui transparent input">
      <input class="prompt" type="text" placeholder="Search" />
    </div>
    <div class="results"></div>
  </div>
</div>
<script>
  $(document).ready(function () {
    $.getJSON('https:\/\/AShao0425.github.io\//index.json', function (data) {
      $('.ui.search').search({
        source: data,
        searchFields: ['title'],
        showNoResults: false,
      })
    })
  })
</script>
<script src="/js/search.js"></script>

    

    

    <script>
  window.background = "/background/back1.png"
  window.defaultDark =  null 
  window.backgroundDark = "/background/BackgroundBlack.jpg"
  window.backgroundImageDark = "/background/BackgroundBlack.jpg"
  window.darkNav =  true 
  window.maxTags =  null 
  window.hasTwitterEmbed =  null 
  window.fixedNav =  true 

  if (window.hasTwitterEmbed) {
    
    window.twttr = (function (d, s, id) {
      var js,
        fjs = d.getElementsByTagName(s)[0],
        t = window.twttr || {}
      if (d.getElementById(id)) return t
      js = d.createElement(s)
      js.id = id
      js.src = 'https://platform.twitter.com/widgets.js'
      fjs.parentNode.insertBefore(js, fjs)

      t._e = []
      t.ready = function (f) {
        t._e.push(f)
      }

      return t
    })(document, 'script', 'twitter-wjs')
  }
</script>
<script src="https://cdn.jsdelivr.net/npm/overlayscrollbars@1.13.1/js/jquery.overlayScrollbars.min.js"></script>
<script src="/js/header.js"></script>
<script src="/js/main.js"></script>
<script src="/js/theme.js"></script>
    


<script src="https://cdn.jsdelivr.net/npm/luxon@1.26.0"></script>

<script>
  format()

  function format() {
    $('span[data-format="luxon"]').each(function () {
      var date = $(this).text()

      $(this).text(luxon.DateTime.fromISO(date, { locale: "en" }).toFormat("yyyy/MM/dd"))
    })
  }
</script>



<script src="/js/scrollToTop.js"></script>


<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release/build/highlight.min.js"></script>



<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release/build/languages/clojure.min.js"></script>

<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release/build/languages/ocaml.min.js"></script>



<script>
  hljs.highlightAll()
  setHighlightTheme()

  function setHighlightTheme() {
    var isDark = localStore.getItem('hugo-theme-dream-is-dark')
    isDark = isDark ? isDark : window.defaultDark ? 'y' : isDark

    var lightTheme = "tomorrow"
    var darkTheme = "tomorrow-night"
    var theme = isDark === 'y' ? darkTheme : lightTheme

    $('link[data-highlight]').attr('href', 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release/build/styles/' + theme + '.min.css')
    $('pre').css('background', isDark === 'y' ? '#333' : '')
  }
</script>



<script src="https://cdn.jsdelivr.net/npm/html2canvas@1.0.0-rc.1"></script>
<script src="/js/post.js" defer></script>


    

    
    
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
	window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
	ga('create', 'UA-206749728-1', 'auto');
	
	ga('send', 'pageview');
}
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>

    
	
	
    <div id="landlord">
      <div class="message" style="opacity:0"></div>
      <canvas id="live2d" width="280" height="250" class="live2d"></canvas>
      <div class="hide-button">Hide</div>
    </div>
    
	
    <script type="text/javascript">
      var message_Path = '/live2d/'
      var home_Path = 'https://ashao0425.github.io/'  <!--Edit the domain into yours here-->
    </script>
    <script type="text/javascript" src="/live2d/js/live2d.js"></script>
    <script type="text/javascript" src="/live2d/js/message.js"></script>
    <script type="text/javascript">
      loadlive2d("live2d", "/live2d/model/tia/model.json");
    </script>
  </body>

  
  
  
	
    <canvas class="fireworks" style="position: fixed;left: 0;top: 0;z-index: 1; pointer-events: none;" ></canvas> 
    <script type="text/javascript" src="/js/anime.min.js"></script> 
    <script type="text/javascript" src="/js/fireworks.js"></script> 
</html>
